package com.zut.fitness.controller;


import com.zut.fitness.common.Result;
import com.zut.fitness.service.IFroUserService;
import com.zut.fitness.utils.JwtUtil;
import com.zut.fitness.utils.ThreadLocalUtil;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.*;


import java.util.List;
import java.util.Map;

/**
 * 前台用户Controller
 * 
 * @author admin
 * @date 2025-01-02
 */
@RestController
@RequestMapping("/FroUser")
public class FroUserController
{
    @Autowired
    private IFroUserService froUserService;




    /**
     * 获取前台用户详细信息
     */

    @GetMapping
    public Result getInfo()
    {

        Map<String, Object> claims= ThreadLocalUtil.get();
        Long id=Long.parseLong(claims.get("id").toString());
        return Result.success(froUserService.selectFroUserById(id));
    }



}
